<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="com.ys.malini.util.PagerContext"%>
<%@ include file="/pages/include/taglibs.jsp" %>
<%
	session.setAttribute("ctx",request.getContextPath());
%>
<html:html lang="true">
	<head>
	

		<TITLE>企业信息查询</TITLE>
		
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">    
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
<link href="<%=request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css" >
<link href="<%=request.getContextPath()%>/css/button.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript">
var path ='${basePath}';
function deleteme(serviceId,serviceType){	
	
	if(confirm('删除该记录：'+serviceId+'？')){
		document.forms[0].action='<%=session.getAttribute("ctx")%>/customerAction.do?op=delete&serviceId='+serviceId+'&serviceType='+serviceType;			
		document.forms[0].submit();  
	}				  
}

function addsService(){	
	document.forms[0].action='<%=session.getAttribute("ctx")%>/customerAction.do?op=toAdd';			
	document.forms[0].submit();  
			  
}
		</script>
</head>

<body bgcolor="#F0F0F0">
 <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
 <tr><td>

			<logic:present name="message" scope="request">
			<table>
				<tr>
					<td width="150" align="right"></td>
					<td>
						<font color="red">${message}</font>
					</td>
				</tr>
			</table>
		</logic:present>
	</td></tr>
 <tr><td>
	<html:form action="/customerAction.do?op=query" method="post">
		<table class="list_tbl_css" width="90%" cellpadding="5" cellspacing="5" border="1">
    	<tr class="list_hd">		
			<td with="10%" nowrap>信息ID</td>	
			<td with="10%" nowrap>信息类型</td>	
			<td with="25%">栏目一</td>		
			<td with="25%">栏目二</td>		
			<td with="30%" nowrap>操作</td>
		</tr>
	
		<logic:present name="customerlist" scope="request">			
			<logic:iterate id="data" name="customerlist" scope="request"
				type="com.ys.malini.model.TServiceinfo">				
				<tr>
					<td nowrap>${data.serviceId}&nbsp;</td>	
					<td nowrap>
						<c:if test="${data.serviceType==0}">隐私和安全</c:if>
						<c:if test="${data.serviceType==1}">条款及客户服务</c:if>
					</td> 				
					<td>${data.content}&nbsp;</td>			
					<td>${data.rsv1}&nbsp;</td>							
					<td nowrap>
						<html:link page="/customerAction.do?op=toUpdate&serviceId=${data.serviceId}">
							<font color="blue">修改</font>							
						</html:link>					
						|					
				      <a href="javascript:void(0)" onclick="javascript:deleteme('${data.serviceId}','${data.serviceType}')" styleId="deleteLink"><font color="blue">删除</font></a>
				      	
                    </td>	
				</tr>
		</logic:iterate>
			<div class="page">
				<TABLE width="70%">
						<TBODY>
							<TR class="list_hd">
								<TD height=28 align=right vAlign="middle" noWrap >
								总页数:<%=com.ys.malini.util.PagerContext.getTotal()/com.ys.malini.util.PagerContext.getPagesize()+1%>
									&nbsp;&nbsp;					
									<pg:pager url="./customerAction.do"							
										items="<%=PagerContext.getTotal()%>"							
										maxPageItems="<%=PagerContext.MAX_PAGE_SIZE%>"
										export="currentPageNumber=pageNumber" scope="request">
										<pg:param name="op" value="query"/>
										<%@include file="/pages/include/pager.jsp"%>
									</pg:pager>						
										
									
									</TD>
							</TR>
						</TBODY>
					</TABLE>
			
			</div>
		</logic:present>
		
		<tr>
			<td colspan="4"><html:button property="add" value="新增" onclick="addsService()"></html:button></td>
		</tr>
	  </table>
	  </html:form>
	  
	 </td></tr>
	 </table>
 </body>
</html:html>
